package com.example.mybatis_plus_use.mapper;

import com.example.mybatis_plus_use.entity.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zjh
 * @since 2025-01-07
 */
@Mapper
public interface OrdersMapper extends BaseMapper<Orders> {
    @Select("select * from orders where user_id = #{User_id}")
    List<Orders> GetAllOrdersByUserId(@Param("User_id") Integer id);
}
